<template>
    <div id="my_view">
		<header class="mui-bar mui-bar-nav">
		<!--<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>-->
			<h1 class="mui-title">我的</h1>
		</header>



          <div class="my_content mui-content">
            <div class="my_top">
              <div class="my_topz"  @tap="open_login_or_edit">
                <div class="my_top_tx">
                  <img :src="$store.state.account.user_info.head?$store.state.account.user_info.head:user_defult_img" />
                </div>
                <div class="my_top_zi">
                  <div class="my_top_name">
                    <div class="my_top_nameh3">
                      <h3>{{$store.state.account.user_info.nickname}}</h3>
                      <img v-show="$store.state.account.user_info" src="../../assets/images/my_bianji.png">
                    </div>
                    <div class="my_login" id="login_stats" v-show="$store.state.account.user_info">
                      已登录
                    </div>
                    <div class="my_login"  v-show="!$store.state.account.user_info">
                      <a>登录/注册</a>

                    </div>
                  </div>
                </div>
              </div>
            </div>
            <div class="my_order">
              <div class="my_order_name">
                <h4>我的订单</h4>
                <i></i>
              </div>
              <ul class="my_order_ul">
                <li @click="onderurl('/my/order','1',1)">
                  <img src="../../assets/images/myshop_01.png" />
                  <span>待付款</span>
                </li>
                <li @click="onderurl('/my/order','2',1)">
                  <img src="../../assets/images/myshop_02.png" />
                  <span>待发货</span>
                </li>
                <li @click="onderurl('/my/order','3',1)">
                  <img src="../../assets/images/myshop_03.png" />
                  <span>待收货</span>
                </li>
                <li @click="onderurl('/my/order','4',1)">
                  <img src="../../assets/images/myshop_04.png" />
                  <span>已完成</span>
                </li>
              </ul>
            </div>

          </div>
          <div class="my_lie">
            <ul>
              <li class="my_lie_li" @tap="open_change_phone_view(true)">
                <div class="my_li_left my_li_left1">
                  <i></i>
                  <h4>修改绑定手机</h4>
                </div>
                <div class="my_li_right">
                  <i></i>
                </div>
              </li>
              <li class="my_lie_li" @click="onderurl('/my/collage','1',1)">
                <div class="my_li_left my_li_left21">
                  <i></i>
                  <h4>我的拼团</h4>
                </div>
                <div class="my_li_right">
                  <i></i>
                </div>
              </li>
              <li class="my_lie_li" @click="onderurl('/my/my_shequ','',0)">
                <div class="my_li_left my_li_left2">
                  <i></i>
                  <h4>我的社区</h4>
                </div>
                <div class="my_li_right">
                  <i></i>
                </div>
              </li>
              <li class="my_lie_li" @click="onderurl('/my/collect_page','',0)">
                <div class="my_li_left my_li_left3">
                  <i></i>
                  <h4>我的收藏</h4>
                </div>
                <div class="my_li_right">
                  <i></i>
                </div>
              </li>
              <li class="my_lie_li" @tap="open_address_view">
                <div class="my_li_left my_li_left4">
                  <i></i>
                  <h4>我的地址</h4>
                </div>
                <div class="my_li_right">
                  <i></i>
                </div>
              </li>
              <li class="my_lie_li" @click="onderurl('/my/help','',0)">
                <div class="my_li_left my_li_left6">
                  <i></i>
                  <h4>帮助咨询</h4>
                </div>
                <div class="my_li_right">
                  <i></i>
                </div>
              </li>

              <li class="my_lie_li" @click="onderurl('/my/setup','',0)">
                <div class="my_li_left my_li_left5">
                  <i></i>
                  <h4>设置</h4>
                </div>
                <div class="my_li_right">
                  <i></i>
                </div>
              </li>
            </ul>
          </div>



        <HomeFooter></HomeFooter>
    </div>
</template>
<script>
import HomeFooter from '../../components/HomeFooter'
export default {
	name:'my',
	data(){
		return{
			user:'',
			user_defult_img:'http://oswxasuvd.bkt.clouddn.com/user_defult.jpg',
			logontype:true
		};
	},
	methods:{
		//订单路由
		onderurl:function(url,val,type){
			if(type == 1){
				this.$router.push({path:url,query: { queryId:  val }});
			}else{
				this.$router.push(url);
			}
		},

    open_login_or_edit(){
		  if(this.$store.state.account.user_info.uid){
		    console.log("已登录")
        this.$store.commit("open_edit_user_info_view",true)
      }else{

        this.open_login()
      }
    },
    // 打开地址管理界面
    open_address_view(){
		  this.$store.commit("open_address_view",true)
    },
		// 打开登陆界面
		open_login(){
			this.$store.commit("open_account_view",true)
		},
    open_change_phone_view(tf){
      this.$store.commit("open_change_phone_view",tf)
    }
	},
	mounted(){

	},
    components:{
        HomeFooter,

    }
}
</script>
<style lang="less" scoped>
@import "../../../static/pxvalue.less";
@import "../../assets/less/my/my.less";
.my_top{
  background-color: #1cb5fc;
  background-image: url('../../assets/images/my_bg.png');
  background-repeat: no-repeat;
}

</style>

